

#######################################
# Convert txt files to compressed dta
#######################################


for YEAR in {2005..2014}
do
	echo $YEAR
	unzip MEMBERMONTH_${YEAR}
	cp 01_2_convert_mm.do 01_2_convert_mm_${YEAR}.do
	stata-mp -b do 01_2_convert_mm_${YEAR}.do $YEAR
	rm 01_2_convert_mm_${YEAR}.do
	
	unzip MED_CLM_${YEAR}
	cp 01_3_convert_med.do 01_3_convert_med_${YEAR}.do
	stata-mp -b do 02_3_convert_med_${YEAR}.do $YEAR
	rm 01_3_convert_med_${YEAR}.do
	
done


